function filterChildren(cache, dataList) {
    let data = cache.data;
    let children = [];

    for (var i = 0; i < dataList.length; i++) {
        if (isParent(data, dataList[i])) {
            let child = getCache(dataList[i]);
            if (!child.parent && cache.index < child.index) {
                children.push(dataList[i]);
            }
        }
    }

    children = children.filter(function (item) {
        let type = figure(item);

        if (type == "Container") {
            if (!item.fills) {
                return false;
            }
            let color = getContainerColor(item);
            if (color.length == 0 && !(item.fills[item.fills.length - 1]).gradient) {
                return false;
            }

            for (var i = 0; i < dataList.length; i++) {
                let other = dataList[i];
                let otherCache = getCache(other);
                if (isParent(other, data) && cache.index > otherCache.index) {
                    let parentType = figure(other);
                    if (parentType == "Container") {
                        let parentColor = getContainerColor(other);
                        if (color == parentColor) {
                            return false;
                        }
                    }
                }
            }
        }
        return type != "SizedBox";
    });

    return children;
}